﻿using dotnet_graphql_demo.Model;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace dotnet_graphql_demo.Infrastructure
{
    public interface IAccountRepository
    {
        /// <summary>
        /// 获取所有账户
        /// </summary>
        /// <returns></returns>
        Task<List<Account>> GetAccountsAllAsync();

        /// <summary>
        /// 获取账号详情
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<Account> GetAccountAsync(Guid id);

        /// <summary>
        /// 创建账号
        /// </summary>
        /// <param name="account"></param>
        Task<Account> CreateAccountAsync(Account account);

        /// <summary>
        /// 通过id获取账号
        /// </summary>
        /// <param name="OwnerId"></param>
        /// <returns></returns>
        Task<List<Account>> GetAccountsByOwnerIdAsync(Guid OwnerId);

        /// <summary>
        /// 修改账号
        /// </summary>
        /// <param name="dbAccount"></param>
        /// <param name="account"></param>
        Task<Account> UpdateAccountAsync(Account dbAccount);

        /// <summary>
        /// 删除账号 
        /// </summary>
        /// <param name="account"></param>
        Task<Account> DeleteAccountAsync(Account account);
    }
}
